home *** CD-ROM | disk | FTP | other *** search
- Path: newsfeed.concentric.net!news-master!not-for-mail
- From: SCLARK74@CRIS.COM (Steve Clark)
- Newsgroups: comp.lang.c
- Subject: Help with the spawnlp function in TC++ 3.0
- Date: 25 Mar 1996 17:06:06 -0500
- Organization: Concentric Internet Services
- Sender: Sclark74@voyager.cris.com
- Message-ID: <UokVxUJdkXxX088yn@CRIS.COM>
- NNTP-Posting-Host: voyager-fddi.cris.com
-
- Hello,
-
- I can't figure out why the following code will not work. What I'm
- trying to do is execute TCC from with in my C program and pass it the
- file TEST.C on the command-line. I can get TCC to execute perfectly but
- no matter what I do, it always ignores the command-line argument. Here's
- the code.
-
-
- ---------------
- #include <process.h>
- #include <stdio.h>
- #include <conio.h>
-
- void main(void)
- {
- int result;
-
- result = spawnlp(P_WAIT, "TCC", "TEST.C", NULL);
- if (result == -1)
- {
- perror("Error:");
- exit(1);
- }
- }
-
- ---------------
-
- What am I doing wrong here? Thanks for any help!
-
- Steve Clark
- CompuServe: 75027,3554
- Internet: sclark74@cris.com
-